<% unless controller.folder_id.blank? or not @logged_in_user.can_create(controller.folder_id) %>
    <%= link_to 'Create folder'.t, { :controller => 'folder', :action => 'new', :id => controller.folder_id } %><br />
    <%= link_to 'Upload file'.t, { :controller => 'file', :action => 'upload', :id => controller.folder_id } %><br />
    <% unless POP_USERNAME[-8..-1]=='.invalid' %>
      <%= link_to 'Add from mailbox'.t, { :controller => 'file', :action => 'inbox', :folder_id => controller.folder_id } %><br />
    <% end %>
    <% if @local_request %>
      <%= link_to 'Add local file(s)'.t, { :controller => 'file', :action => 'link', :id => controller.folder_id } %>
    <% end %>
<% end %>